package cn.tedu.tmall.front.mall.pojo.po;

import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@Document(indexName = "index_crud")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class GoodsSearchPO implements Serializable {

    @Id
    Long id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    String title;

    /**
     * 1 表示上架
     * 0 表示下架
     */
    Integer isPutOn;

    /**
     * 商品价格
     */
    BigDecimal salePrice;
}
